import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.util.ArrayList;
import java.util.List;


public class FileCopy {

	private static void copyFile(File sourceFile, File destFile)
			throws IOException {
		if (!sourceFile.exists()) {
			return;
		}
		if (!destFile.exists()) {
			destFile.createNewFile();
		}
		FileChannel source = null;
		FileChannel destination = null;
		source = new FileInputStream(sourceFile).getChannel();
		destination = new FileOutputStream(destFile).getChannel();
		if (destination != null && source != null) {
			destination.transferFrom(source, 0, source.size());
		}
		if (source != null) {
			source.close();
		}
		if (destination != null) {
			destination.close();
		}

	}
	
	public static void main(String[] args) throws IOException {
		
		/*File sourceFile = new File("C:\\rama.txt");
		File distFile = new File("C:\\RK\\rama.txt");
		System.out.println(sourceFile.getName());
		copyFile(sourceFile, distFile);*/
		/*String str = "INKKNA - CLIFCBF  List: 2013-03-28 00:53:37";
		String str1= "CLIF CBF";
		System.out.println(str1);
		System.out.println(str1.trim());
		if(str.contains("CLIF CBF")){
			System.out.println("find successfully");
		}
		System.out.println("not find successfully");*/
		
		final List<String> list = new ArrayList<String>();
		list.add("ram");
		list.add("krishna");
		
		System.out.println("Before modifing \t"+list);
		
		list.add("kri");
		System.out.println("After Modifing \t"+list);
		
		System.out.println("After Modifing \t"+list.size());
		list.remove(0);
		System.out.println("After Modifing \t"+list);
		list.remove(1);
		System.out.println("After Modifing \t"+list);
		list.remove(2);
		//System.out.println("After Modifing \t"+list.size());
		
		
	}
}
